:: close cmd echo
@echo off

:: use utf-8
chcp 65001

set n_python=0
for /F %%i in ('where python') do ( set n_python=1)

if %n_python%==1 (
    echo "下载PythonHelper"
    md %APPDATA%\PythonHelper
    curl -o %APPDATA%\PythonHelper\python-helper.bat http://localhost:3000/python-helper.bat
    curl -o %APPDATA%\PythonHelper\python-helper.py http://localhost:3000/python-helper.py
    python %APPDATA%\PythonHelper\python-helper.py init
) else (
    echo "没有安装python，即将打开应用商店下载，请安装后重新运行本向导。"
    python
)

pause
